﻿@{
    var CurentUser = Session["CurentUser"] as GSLMS.Entity.DTO.CurrentUserDTO;
    var menuRoles = new List<GSLMS.Entity.VRolePurview>();
    if (CurentUser != null && CurentUser.Roles != null)
    {
        menuRoles = CurentUser.Roles;
    }
    
}

<div class="accordion" fillspace="sidebar">
    @foreach (var item in menuRoles.Where(c => string.IsNullOrEmpty(c.Parent) && (c.Types.HasValue && c.Types == 0 || !c.Types.HasValue)).OrderBy(c => c.Order))
    { 
        <div class="accordionHeader">
            <h2>
                <span>Folder</span>@item.ModuleName</h2>
        </div>
        <div class="accordionContent">
            @GSLMS.WebAPP.MyHtmlHelper.GenerateLeftMenu(menuRoles.Where(c => c.Parent == item.ID && c.Types == 0).ToList(), menuRoles, 1)
            
        </div>
    }
</div>
